Maths Olympiad exponential equation